package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-16
 */
public class Icon implements Sequenceable, Serializable {
    @SerializedName("iconType")
    private String iconType;

    public static final Sequenceable.Producer<Icon> CREATOR = new Producer<Icon>() {
        @Override
        public Icon createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            Icon icon = new Icon();
            icon.unmarshalling(parcel);
            return icon;
        }
    };

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeString(this.iconType);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.iconType=parcel.readString();
        return true;
    }

    @Override
    public String toString() {
        return "Icon{" +
                "iconType = '" + iconType + '\'' +
                "}";
    }

    public String getIconType() {
        return iconType;
    }

    public void setIconType(String iconType) {
        this.iconType = iconType;
    }
}
